package kyy

import (
	"gitee.com/leo-xin/novel_distribution_sdk_go/common/middleware"
	"gitee.com/leo-xin/novel_distribution_sdk_go/wending/kyy/api"
	"gitee.com/leo-xin/novel_distribution_sdk_go/wending/kyy/config"
)

type Client struct {
	ApiClient *api.APIClient
}

func Init(cfg *config.Configuration) *Client {
	client := &Client{
		ApiClient: api.NewAPIClient(cfg),
	}
	if cfg.LogEnable {
		client.ApiClient.Use(middleware.LogMiddleware)
	}

	return client
}

func (c *Client) LinkListApi() *api.LinkListApiService {
	return c.ApiClient.LinkListApi
}

func (c *Client) UserListApi() *api.UserListApiService {
	return c.ApiClient.UserListApi
}

func (c *Client) RechargeListApi() *api.RechargeListApiService {
	return c.ApiClient.RechargeListApi
}

func (c *Client) UserDesktopListApi() *api.UserDesktopListApiService {
	return c.ApiClient.UserDesktopListApi
}
